import { FC } from 'react'
import { RouteComponentProps } from 'react-router-dom'
// RouteComponentProps 路由组件的类型声明(location match history)
type Iprops = {
    age:number
} & RouteComponentProps<{id:string}>
const Friend:FC<Iprops> = (props:any) => {
    console.log(props);
    return(
        <fieldset>
            <legend>守望先锋2</legend>
            <h2>动态路由参数{props.match.params.id}</h2>
            <h1>源氏</h1>
            <h1>半藏</h1>
            <h1>麦克雷</h1>
            <h1>托比昂</h1>
            <h1>士兵76</h1>
        </fieldset>
    )
}
export default Friend